/* Tabs组件样式 */
.tabs-container {
  background: #ffffff;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.tabs-container:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-color: #4285f4;
}

/* Tab导航头部 */
.tabs-header {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #e8eaed;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.tabs-header::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Tab按钮 */
.tab-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #5f6368;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: fit-content;
  flex-shrink: 0;
}

.tab-button:hover {
  background: #e8eaed;
  color: #202124;
}

.tab-button.active {
  color: #4285f4;
  border-bottom-color: #4285f4;
  background: #ffffff;
}

/* Tab图标 */
.tab-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

/* Tab标签 */
.tab-label {
  font-weight: 500;
}

/* Tab徽章 */
.tab-badge {
  background: #ea4335;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 500;
  min-width: 16px;
  text-align: center;
}

.tab-button.active .tab-badge {
  background: #4285f4;
}

/* Tab内容区域 */
.tabs-content {
  position: relative;
  min-height: 200px;
}

/* Tab面板 */
.tab-panel {
  display: none;
  padding: 0;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-panel.active {
  display: block;
}

/* 淡入动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 特殊内容区域的padding */
.tab-panel .chart-container {
  padding: 20px;
}

.tab-panel .data-table {
  padding: 0;
}

.tab-panel .code-block {
  padding: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .tab-button {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .tab-icon {
    font-size: 14px;
    width: 18px;
  }
  
  .tab-badge {
    font-size: 9px;
    padding: 1px 4px;
  }
  
  .tabs-content {
    min-height: 150px;
  }
  
  .tab-panel .chart-container {
    padding: 12px;
  }
}

/* 当只有一个tab时的样式 */
.tabs-container:has(.tab-button:only-child) .tabs-header {
  display: none;
}

.tabs-container:has(.tab-button:only-child) .tabs-content {
  border-top: none;
}

/* 当没有tab时的样式 */
.tabs-container:not(:has(.tab-button)) {
  display: none;
}
